how to check if value exiets in map in go

178

how to check if value exiets in map in go -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments